<div id="page">
    <ul id="slider">
        <?php
            $sanpham = new sanphambs();
            $danhsach = $sanpham->GetList_New();
            for($i = 0; $i < ($danhsach == false ? 0 : 5) ; $i++)
            {
                $hinhanh = new hinhanhbs();
                $hinhanh->MaSanPham = $danhsach[$i]['MaSanPham'];
                $dshinh = $hinhanh->GetList();
                echo " <li><a href='index.php?do=chitietsanpham&msp={$danhsach[$i]['MaSanPham']}'><img src='{$dshinh[0]['patch']}' /> </a> </li>";
            }
        ?>
    </ul>
</div>